package cn.leon.controller;

import cn.leon.common.pojo.TaotaoResult;
import cn.leon.search.service.SearchItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexManagerController {
    @Autowired
    private SearchItemService searchItemService;

    @RequestMapping("/index/import")
    @ResponseBody
    public TaotaoResult indexImport() throws Exception{
        TaotaoResult taotaoResult = searchItemService.ImportAllItemToIndex();
        return taotaoResult;
    }
}
